package com.jsn.controller;


import com.jsn.responseEntity.R;
import com.jsn.support.BaseController;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

@RestController
@RequestMapping("/user")
public class UserController extends BaseController {


    @RequestMapping("/info")
    public Authentication info(OAuth2Authentication user  ) {
        System.out.println(user);
        return user;
    }

}
